<?php
/*. require_module 'standard'; .*/
/**
 * A class that sends an actual email message
 */
class Mailer
{
    /**
     * Get the headers to send an email message
     *
     * @return string
     * @param string $fromAddress
     */
    function getHeaders($fromAddress)
    {
        $headers = <<< EOT
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
From: $fromAddress
EOT;
    return $headers;
    }
    /** Send an email
     *
     * @return bool
     * @param string $fromAddress
     * @param string $toAddress
     * @param string $subject
     * @param string $message
     */
    function sendMessage($fromAddress, $toAddress, $subject, $message)
    {
        $headers = $this->getHeaders($fromAddress);
        return mail($toAddress, $subject, $message, $headers);
    }
}
?>
